package com.taxshare.manager.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.taxshare.manager.entity.ResourceEntity;
import com.taxshare.manager.entity.RoleResourceEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: RoleResourceMapper
 * @Description: 
 * @author luozhongyi
 * @since 2021-01-28
 */
@Mapper
public interface RoleResourceMapper extends BaseMapper<RoleResourceEntity> {

     /**
      * 根据用户获取资源
      * @param userid
      * @return
      */
     List<ResourceEntity> queryResourceInfoByUserId(@Param("userid") String userid);

     /**
      * 根据角色获取资源
      * @param queryWrapper
      * @return
      */
     List<String> queryResourceInfoByRoleId(@Param(Constants.WRAPPER)Wrapper<RoleResourceEntity> queryWrapper);

     /**
      * 查询普通用户资源信息
      * @return
      */
     List<ResourceEntity> queryResourceInfo();

     /**
      * 查询系统管理员资源信息
      * @return
      */
     List<ResourceEntity> querySystemResourceInfo();
}
